package com.hst.capacity.infra.convertor;

import com.hst.capacity.domain.common.constants.Constants;
import com.hst.capacity.domain.model.entity.brand.BrandUserEntity;
import com.hst.capacity.domain.model.request.brand.BrandUserParam;
import com.hst.capacity.domain.model.response.brand.BrandUserVO;
import com.hst.capacity.domain.model.entity.account.*;
import com.hst.capacity.domain.model.entity.order.express.ExpressOrderEntity;
import com.hst.capacity.domain.model.response.account.*;
import com.hst.capacity.domain.model.response.franchisee.FranchiseeDepositDetailVO;
import com.hst.capacity.domain.model.response.order.OrderVO;

import org.mapstruct.Mapper;
import org.mapstruct.Mapping;
import org.mapstruct.ReportingPolicy;
import org.mapstruct.factory.Mappers;

import java.util.List;

/**
 *  品牌商的POJO属性转换器
 *  品牌模块的POJO属性转换器
 *
 * @author jin
 * */
@Mapper(unmappedTargetPolicy = ReportingPolicy.IGNORE)
public interface BrandConvertor {

    BrandConvertor INSTANCE = Mappers.getMapper(BrandConvertor.class);

    BrandUserEntity convert(BrandUserParam param);
    @Mapping(target = "createTime",dateFormat = Constants.DATE_FORMAT)
    @Mapping(target = "updateTime",dateFormat = Constants.DATE_FORMAT)
    BrandUserVO convert(BrandUserEntity entity);
    @Mapping(target = "createTime",dateFormat = Constants.DATE_FORMAT)
    @Mapping(target = "updateTime",dateFormat = Constants.DATE_FORMAT)
    List<BrandUserVO> convert(List<BrandUserEntity> entity);

}
